<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
    <title>二板数量走势图</title>

    <!-- 引入vue    -->
    <script src="echarts.min.js"></script>
    <!-- <script src="https://gitee.com/liaoqiangang/stock/blob/master/echarts.min.js"></script> -->
</head>

<body>

    <!-- 为 ECharts 准备一个定义了宽高的 DOM -->
    <div id="main" style="width: 1400px;height:700px;"></div>
    <script type="text/javascript">

        // 基于准备好的dom，初始化echarts实例
        var myChart = echarts.init(document.getElementById('main'));
        var riqiArray = [
            // '2-19', '2-20', '2-21', '2-22', '2-23',
            '2-26', '2-27', '2-28', '2-29', '3-1',
            '3-4', '3-5', '3-6', '3-7', '3-8',
            '3-11', '3-12', '3-13', '3-14', '3-15',
            '3-18', '3-19', '3-20', '3-21', '3-22',
            '3-25', '3-26', '3-27', '3-28', '3-29',
            '4-1','4-2'
        ];
        var lianbanNumArray = [
            // 74, 34, 4, 7, 19,
            12, 16, 5, 10, 20,
            8, 8, 9, 7, 8,
            14, 10, 8, 3, 14,
            12, 8, 13, 14, 9,
            7, 8, 5, 5, 8,
            10,10
        ];
        // 指定图表的配置项和数据
        var option = {
            title: {
                text: "二板数量",
                textStyle: {
                    fontSize: 30,
                    center: true
                }
            },
            tooltip: {
                trigger: 'axis'
            },
            xAxis: {
                name: "日期",
                type: 'category',
                data: riqiArray
            },
            yAxis: {
                type: 'value'
            },
            series: [
                {
                    name: "连板数量",
                    showAllSymbol: true,
                    data: lianbanNumArray,
                    type: 'line',
                    smooth: true,
                    itemStyle: {
                        color: '#ff0000',
                        normal: {
                            label: {
                                show: true
                            }
                        }
                    }
                }
            ],


        };
        myChart.setOption(option);
        // 使用刚指定的配置项和数据显示图表。
        // myChart.setOption(option);
    </script>
</body>

</html>